#!/bin/sh

cargo build --target=x86_64-unknown-linux-musl --target-dir=target

docker run \
        -v "$PWD"/jiapkg-pkg:/root/jiapkg/jiapkg-pkg \
        -v "$PWD"/target:/root/target \
        -d \
        --name jiapkg-test-container \
        -it \
        --rm \
        jiapkg-test \
        /bin/bash

# Copy a script to run "jiapkg" under /root/target.
docker cp docker/jiapkg jiapkg-test-container:/bin/jiapkg

docker exec -it jiapkg-test-container /bin/bash
docker kill jiapkg-test-container
